package com.ws.client.feign;

import com.ws.client.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        name = "soapWitherService",
        url = "http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx",
        configuration =  WebXmlFeignClientConfiguration.class)
public interface SoapWitherService {

    @PostMapping( consumes = MediaType.TEXT_XML_VALUE, produces = MediaType.TEXT_XML_VALUE,headers = {"SOAPAction:http://WebXml.com.cn/ValidateEmailAddress"})
    ValidateEmailAddressResponse getSupportCityResult(@RequestBody ValidateEmailAddress request);

}
